const path = require('path');

module.exports = {
    // mode: 'production',
    mode: 'development',
    entry: path.resolve(__dirname, './src/components/demo.js'),
    output: {
        path: path.resolve(__dirname, './dist'),
        filename: 'index.js',
        libraryTarget: 'umd',
        libraryExport: 'default',
        library: "testReact",
    },
    module: {
        rules: [
            {
                test: /\.(mjs|js|jsx)$/,
                exclude: /node_modules/,
                use: ['babel-loader'],
            }
        ],
    },

    resolve: {
        extensions: ['.mjs', '.js', '.jsx'],
    },
};